package com.ysu.yybk.factory;

import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.iai.v20180301.IaiClient;

/**
 * @author ：lhw
 * @date ：Created in 2019/11/26 15:53
 */
public class TencentFactory {

    private static IaiClient iaiClient;

    private static final String SECRET_ID = "AKIDnOkskMCxwf8LJoz75oIWUI1YquiG7iaE";
    private static final String SECRET_KEY = "ZtKadT3OTJtNcdOuDI7g7IDsOfjX5Ymk";

    private TencentFactory(){

    }
    static {
        // 实例化一个认证对象，入参需要传入腾讯云账户secretId，secretKey
        Credential cred = new Credential(SECRET_ID, SECRET_KEY);
        // 实例化要请求产品(以cvm为例)的client对象
        iaiClient = new IaiClient(cred, "ap-beijing");
    }

    public static IaiClient getIaiClient(){
        return iaiClient;
    }
}
